//
//  CZSelectFontSizeCell.m
//  globalTranslate
//
//  Created by 陈镇 on 2025/8/12.
//

#import "CZSelectFontSizeCell.h"
#import "CZSelectFontSizeView.h"


@interface CZSelectFontSizeCell ()

@property(nonatomic,strong) QMUILabel *title;
@property(nonatomic,strong) CZSelectFontSizeView *selectFontView;
@end
@implementation CZSelectFontSizeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)didInitializeWithStyle:(UITableViewCellStyle)style{
    [super didInitializeWithStyle:style];
    
    
    [self.contentView addSubview:self.title];
    [self.contentView addSubview:self.selectFontView];
    
    
}

-(QMUILabel *)title{
    if (!_title) {
        _title = [QMUILabel createTextColor:UIColorHex(222222) font:SLFontMakeRegular(15) textAlignment:NSTextAlignmentLeft];
        _title.text = @"字号选择：";
    }
    return _title;
}
-(CZSelectFontSizeView *)selectFontView{
    if (!_selectFontView) {
        _selectFontView = [[CZSelectFontSizeView alloc] init];
    }
    return _selectFontView;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    [_title sizeToFit];
    _title.frame = CGRectMake(15, 0, _title.width, self.height - 10);
    _selectFontView.frame = CGRectMake(_title.right, 7, _selectFontView.width, _selectFontView.height);
//    self.contentView.frame = CGRectMake(self.headerView.left - (tmp_size.width + 30) - 10, 0, tmp_size.width + 30, tmp_size.height + 24 + tmp_size_2.height + 30);
    
    self.contentView.frame = CGRectMake(self.headerView.right+10 , 0, _selectFontView.right + 15, 50);
}
-(CGSize)sizeThatFits:(CGSize)size{
   
    return CGSizeMake(SCREEN_WIDTH, 50 + 10);
}
@end
